home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / DbaseIII+ {Windows} / DISK6 / SAMPLES2.PAK / CHANGEQ.WFM < prev    next >
Encoding:
Text File  |  1994-08-02  |  4.7 KB  |  181 lines

  1. ******************************************************************************
  2. *  PROGRAM:      Changeq.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         5/93
  7. *
  8. *  UPDATED:      6/94
  9. *
  10. *  REVISION:     $Revision:   1.48  $
  11. *
  12. *  VERSION:      dBASE FOR WINDOWS 5.0
  13. *
  14. *  DESCRIPTION:  This is a form called from Equipmnt.wfm that brings up a
  15. *                dialog which allows selecting an aircraft to replace the
  16. *                one currently used for a flight.  This form contains
  17. *                a listbox of plane names, and a bitmap displaying the
  18. *                currently selected plane type.  It also has Ok and Cancel
  19. *                buttons that respectively allow the selections to be saved or
  20. *                ignored.
  21. *
  22. *
  23. *  PARAMETERS:   None
  24. *
  25. *  CALLS:        Buttons.cc  (Custom controls file)
  26. *                Changeq.qbe (View of tables)
  27. *
  28. *  USAGE:        Do Changeq.wfm
  29. *                or
  30. *                (this is how this file is used in the equipment program)
  31. *
  32. *                set procedure to Changeq.wfm additive
  33. *                local f
  34. *                f = new ChangEq()
  35. *                f.mdi = .f.       && because modal forms cannot be mdi
  36. *                f.ReadModal()
  37. *
  38. *******************************************************************************
  39. create session
  40. set talk off
  41. set ldCheck off
  42.  
  43. ** END HEADER -- do not remove this line*
  44. * Generated on 06/17/94
  45. *
  46. LOCAL f
  47. f = NEW CHANGEQFORM()
  48. f.Open()
  49.  
  50. CLASS CHANGEQFORM OF FORM
  51.    Set Procedure to Buttons.cc Additive
  52.    this.ColorNormal = "N/0XFFFF80"
  53.    this.Text = "Equipment Selection"
  54.    this.MousePointer =          1
  55.    this.View = "CHANGEQ.QBE"
  56.    this.Width =         61.25
  57.    this.Top =          0.54
  58.    this.Left =         19.42
  59.    this.Height =         18.18
  60.    this.Minimize = .F.
  61.    this.Maximize = .F.
  62.    this.HelpFile = ""
  63.    this.OnClose = {;close procedure Buttons.cc}
  64.    this.HelpId = ""
  65.    this.OnSelection = CLASS::ONSELECTION
  66.  
  67.    DEFINE IMAGE LOGOIMAGE OF THIS;
  68.        PROPERTY;
  69.          Alignment          2,;
  70.          DataSource "FILENAME AIRBRLN2.BMP",;
  71.          Width         61.36,;
  72.          Top          0.00,;
  73.          Left          0.00,;
  74.          Height          5.78
  75.  
  76.    DEFINE ENTRYFIELD AIRCRAFT OF THIS;
  77.        PROPERTY;
  78.          ColorNormal "N/0XFFFF80",;
  79.          Border .F.,;
  80.          Width         32.87,;
  81.          Top          6.06,;
  82.          DataLink "AIRCRDB->AIRCRAFT",;
  83.          Left         26.23,;
  84.          Height          1.10,;
  85.          FontSize         10.00,;
  86.          Enabled .F.
  87.  
  88.    DEFINE TEXT TYPETEXT OF THIS;
  89.        PROPERTY;
  90.          ColorNormal "N/0XFFFF80",;
  91.          Border .F.,;
  92.          Text "Plane",;
  93.          Width         23.74,;
  94.          Top          6.06,;
  95.          Left          1.16,;
  96.          Height          1.10,;
  97.          FontSize         10.00
  98.  
  99.    DEFINE LISTBOX PLANETYPE OF THIS;
  100.        PROPERTY;
  101.          DataSource "FIELD AIRCRDB->AIRCRAFT",;
  102.          ColorNormal "N/GB*",;
  103.          CurSel 1,;
  104.          ColorHighLight "W+/B",;
  105.          ID        800,;
  106.          Width         23.74,;
  107.          Top          7.42,;
  108.          Left          1.16,;
  109.          FontName "Arial",;
  110.          Height          8.32,;
  111.          FontSize         11.25,;
  112.          FontItalic .T.
  113.  
  114.  
  115.    DEFINE OKBUTTON OKCHANGEQ OF THIS;
  116.        PROPERTY;
  117.          Text "OK",;
  118.          Width         14.11,;
  119.          Top         16.16,;
  120.          Left         30.71,;
  121.          Default .T.,;
  122.          Height          1.50
  123.  
  124.    DEFINE CANCELBUTTON CANCELCHANGEQ OF THIS;
  125.        PROPERTY;
  126.          Text "Cancel",;
  127.          Width         14.11,;
  128.          Top         16.16,;
  129.          Left         45.65,;
  130.          Height          1.50,;
  131.          Group .F.,;
  132.          Id 0
  133.  
  134.    DEFINE IMAGE PLANEIMAGE OF THIS;
  135.        PROPERTY;
  136.          DataSource "BINARY AIRCRDB->IMAGE",;
  137.          Width         33.53,;
  138.          Top          7.42,;
  139.          Left         26.23,;
  140.          Height          8.26
  141.  
  142.    *******************************************************************************
  143.    procedure OnOpen
  144.    *******************************************************************************
  145.    if type("this.childRec") <> "U"
  146.       this.planeType.curSel = this.childRec
  147.       go this.childRec
  148.    endif
  149.  
  150.    *******************************************************************************
  151.    procedure OnSelection (controlId)
  152.    *******************************************************************************
  153.    if controlId <> 0                      && Cancel wasn't selected
  154.       this.value = this.planetype.value   && Return value to calling form
  155.    endif
  156.    this.Close()
  157.  
  158. ENDCLASS
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.